package com.uwo.house.service.serviceImpl;

import com.uwo.house.beans.request.PackageQueryReq;
import com.uwo.house.beans.request.PackageReq;
import com.uwo.house.beans.response.MaterialDictionary;
import com.uwo.house.beans.response.PackageDetailsResp;
import com.uwo.house.beans.response.PackageListResp;
import com.uwo.house.dao.PackageManagerDao;
import com.uwo.house.service.IPackageManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by cyn1c on 2017/7/23.
 */
@Service
public class PackageManagerService implements IPackageManagerService {
    @Autowired
    public PackageManagerDao packageManagerDao;

    public int addPackage(PackageReq packageReq){
        return this.packageManagerDao.addPackage(packageReq);
    }

    public int modifyPackage(PackageReq packageReq){
        return packageManagerDao.modifyPackage(packageReq);
    }

    public List<PackageListResp> getPackageList(PackageQueryReq packageQueryReq) {
        return this.packageManagerDao.getPackageList(packageQueryReq);
    }

    public PackageDetailsResp getPackageDetailsById(String packageId){
        return this.packageManagerDao.getPackageDetailsById(packageId);
    }

    public int deletePackage(String packageId){
        return this.packageManagerDao.deletePackage(packageId);
    }

    public List<MaterialDictionary> getMaterialDictionary(){
        return this.packageManagerDao.getMaterialDictionary();
    }

    public int checkIdExist(String packageId){
        return this.packageManagerDao.checkIdExist(packageId);
    }
}
